<template>
	<view class="content">
		<view class="">
			<scroll-view scroll-top="0" scroll-y='true' @scrolltolower="more">
				<view class="noData" v-if="counselor.list.length<1">暂无数据</view>
				<view class="row" @tap="navTo('/pages/works/detail?id='+item.id)" v-for="(item,index) in counselor.list" :key="index" v-else>
					
					<view class="record-list">
						
						<view style="display: flex;">
							<image :src="item.thumb" style="display: inline-block; width: 72px;height: 72px;margin-right: 10px;"></image>
							<view class="">
								<view class="record-list-title">{{item.title||"-"}}</view>
								<view class="record-list-title">负责楼盘：{{item.loupanid||"-"}}</view>
								<view class="uni-time">手机号码：{{item.mobile}}</view>
							</view>
						</view>
						
					</view>
				</view>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	import { counselor } from '@/api/product';
	import moment from '@/common/moment';
	export default {
		components: {  },
		data() {
			return {
				counselor:{
					list:[{}]
				}
			};
		},
		onLoad() {
			var state=uni.getStorageSync('user_info');
			counselor(state.mobile).then(data => {
				this.counselor.list=data.list
			});
		},
		methods: {
			// 通用跳转
			navTo(route) {
				if (!route) return;
				this.$mRouter.push({
					route
				});
			},
		},
		filters: {
			time(val) {
				return moment(val * 1000).format('YYYY-MM-DD HH:mm:ss');
			},
			date(val) {
				return moment(val * 1000).format('YYYY-MM-DD');
			},
		},
	};
</script>

<style lang="scss">
	@import url("@/static/css/common.css");
	page {
		background-color: $page-color-base;
	}
</style>
